package com.atomos.strategy.emission
{
	import flash.geom.Point;	

	public class FixedCountEmission extends AbstractEmission
	{
		protected var _nCount : Number;
		
		public function FixedCountEmission( type : Class, position : Point = null, count : Number = 0 )
		{
			super( type, position );
			
			_nCount = count;
		}
		
		public override function prepareEmission( time : Number ) : void
		{}
		
		public override function nextTime() : Number
		{
			return 0;
		}
		
		public override function hasNext() : Boolean
		{
			return _nCount > 0;
		}
		
		public override function next() : *
		{
			_nCount--;
			return super.next();			
		}
		
		public override function isFinish() : Boolean
		{
			return true;
		}
	}
}